<?php

namespace app\api\controller\user;

use think\Model;

class User extends Model
{
    public function getAvatarAttr($value, $data)
    {
        if (!$value) {
            $value = letter_avatar($data['nickname']);
        }
        return $value;
    }
}